<div class='cat'>
	<?php echo '<h1>&nbsp;'.$name.'</h1>';?>
	<hr color="#b60909" size="20">
	<?php 
	$col = 3;
	$countsubcate = count($subcate);
	echo '<table class="contentcate">';
		for ($i=0;$i<$countsubcate;$i=$i+$col){
			echo '<tr>';
				if(isset($subcate[$i]['cat_type_sub_name'])){
					echo '<td class="contentcate_td"><div class="cellcat">';
						echo '<br>'.anchor(base_url().'catcont/getCatId/'.$subcate[$i]['cat_type_sub_id'],$subcate[$i]['cat_type_sub_name']).'<br><br>';
						echo anchor(base_url().'catcont/getCatId/'.$subcate[$i]['cat_type_sub_id'],'<img src="'.base_url().'public/images/'.$subcate[$i]['images'].'" class="statusicon" width="240" height="175">');
					echo '</div></td>';
				}else echo '<td></td>';
				if(isset($subcate[$i+1]['cat_type_sub_name'])){
					echo '<td class="contentcate_td"><div class="cellcat">';
						echo '<br>'.anchor(base_url().'catcont/getCatId/'.$subcate[$i+1]['cat_type_sub_id'],$subcate[$i+1]['cat_type_sub_name']).'<br><br>';
						echo anchor(base_url().'catcont/getCatId/'.$subcate[$i+1]['cat_type_sub_id'],'<img src="'.base_url().'public/images/'.$subcate[$i+1]['images'].'" class="statusicon" width="240" height="175">');
					echo '</div></td>';
				}else echo '<td></td>';
				if(isset($subcate[$i+2]['cat_type_sub_name'])){
					echo '<td class="contentcate_td"><div class="cellcat">';
						echo '<br>'. anchor(base_url().'catcont/getCatId/'.$subcate[$i]['cat_type_sub_id'],$subcate[$i+2]['cat_type_sub_name']).'<br><br>';
						echo anchor(base_url().'catcont/getCatId/'.$subcate[$i]['cat_type_sub_id'],'<img src="'.base_url().'public/images/'.$subcate[$i+2]['images'].'" class="statusicon" width="240" height="175">');
					echo '</div></td>';
				}else echo '<td></td>';
			echo '</tr>';
		}
	echo '</table>';
	?>
</div>